package com.ls.blog.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author lishun
 * @since 2022-01-14
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ArticleDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    private Integer id;

    private String title;

    private String description;

    private String firstPicture;

    private String content;


    private Integer published;

    private Integer appreciation;

    private Integer commentabled;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "Asia/ShangHai")
    private LocalDateTime createTime;

    private Integer recommend;

    private Integer shareStatement;

    private LocalDateTime updateTime;

    private Integer views;


    private Integer userId;

    private Integer commentCount;

    private Integer isDelete;

    private List<String> tags;

    /**
     * 博客分类名
     */
    String category;

    Integer categoryId;
    /**
     * 是否点赞
     */
    Boolean isLike = false;

    /**
     * 点赞量
     */
    Integer upCount = 0;


    /**
     * 是否置顶
     */
    private Integer isTop;

}
